#include "dialog.h"
#include "ui_dialog.h"
#include "mythread.h"
Dialog::Dialog(QWidget *parent)
    : QDialog(parent)
    , ui(new Ui::Dialog)
{
    ui->setupUi(this);
    socket11=NULL;
    QString port=ui->lineEdit_ServerPort->text();
    quint16 port1=port.toInt();
    server=new QTcpServer(this);
    server->listen(QHostAddress::Any,port1);
    connect(server,&QTcpServer::newConnection,this,[=]()
    {
        socket11=server->nextPendingConnection();
        ui->lineEdit_Count->setText(tr("客户端请求%1次").arg(++count));

    });



}

Dialog::~Dialog()
{
    delete ui;
}

